package com.bit.www;

public class Dog {
    private String name;
    private int age;
    private String color;

    public Dog(String name, int age, String color) {
        this.name = name;
        this.age = age;
        this.color = color;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public void barks() {
        System.out.println(this.name + "汪汪叫...");
    }

    public void eat() {
        System.out.println(this.name + "正在吃...");
    }

    public static void staticFunc() {
        System.out.println("静态方法被执行了...");
    }

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", color='" + color + '\'' +
                '}';
    }
}

//public class Test {
//    int num = 99;//创建一个成员变量
//    public static void main1(String[] args) {
//        System.out.println("相同包");
//    }
//}
